#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
void Reverse(char* str) {
    char* left = str;
    char* right = str + strlen(str) - 1;
    while (left < right) {
        char tmp = *left;
        *left = *right;
        *right = tmp;
        left++;
        right--;
    }
}
int main6() {
    char str[10000] = { 0 };
    while (gets(str)) {
        Reverse(str);
        printf("%s\n", str);
    }
    return 0;
}